﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace GOF23.Singleton
{
    /// <summary>
    /// 使用System.Lazy<T> type来实现完全懒汉式
    /// 代码砍起来简单，且表现不错。
    /// </summary>
    public sealed class Singleton6
    {
        private static readonly Lazy<Singleton6> instance = new Lazy<Singleton6>(() => new Singleton6());
        public static Singleton6 Instance => instance.Value;
        private Singleton6() { }
    }
}
